<?php $url = new Url();  ?>
<script type="text/javascript">
    function ajaxDelete(id,type,filename,create_date){
        var strUrl = "<?=$url->createUrl("service/ajaxDelete") ?>";
        if(confirm('Bạn có chắc chắn muốn xóa không ?')){
            $.ajax({
                type: "POST",
                url: strUrl,
                data: {
                    id:id,
                    type:type,
                    filename:filename,
                    create_date:create_date
                },
                success: function(msg){
                    if(msg == 1){
                        alert('Xóa thành công');
                        location.reload();
                    }else{
                        alert(msg);
                    }
                }          
            });
        }
    }
</script>
<!-- box login --> 
<?php $this->renderPartial("application.views.layouts._menu");?>
<!-- end box login -->
<div class="about">
    <?php $this->widget("BoxLogin");?>
    <h1><a><img class="kc_TB_td" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb-icon-DS-ma-nhung.png"></a><a class="xanhdam" href="#">Danh Sách File Jar</a>
    </h1>
    <div class="APK_4">
        <table width="100%" cellspacing="1" cellpadding="1" border="0">
            <tbody>
                <tr class="APK_4_ngang">
                    <td width="10%" align="center"><strong>STT</strong> </td>
                    <td width="20%" align="center"><strong>Tên</strong></td>
                    <td width="20%" align="center"><strong>Giá</strong> </td>
                    <td width="20%" align="center"><strong>Chờ</strong></td>
                    <td width="20%" align="center"><strong>Lần</strong> Kích Hoạt</td>
                    <td width="10%" align="center"><strong>Hành động</strong> </td>
                </tr>
                <?php foreach($data as $key=>$value){ ?>
                    <tr class="APK_4_ngang1">

                        <td align="center"><?php echo $key+1; ?></td>
                        <td style="padding-left : 10px"><a class="xanhDV" href="<?php if($value['status']==1){ echo Url::createUrl("service/gameModDetailJar",array("id"=>$value['id']));} ?>"><?php echo $value['filename'];if($value['status']==0){echo "<span style='color:red'>( Đang xử lý )</span>" ;} if($value['status']==0){echo "<span style='color:red'> ( Lỗi )</span>" ;} ?></a></td>
                        <td align="center"><?php echo $value['price']; ?></td>
                        <td align="center"><?php echo $value['timeTrial']; ?></td>
                        <td align="center"><?php echo $value['timeSms']; ?></td>
                        <td align="center"><a class="xanhDV" href="javascript:void(0)" onclick="ajaxDelete('<?php echo $value["id"]?>','java','<?php echo $value["filename"]?>','<?php echo $value["create_date"]?>')"> Xóa </a> </td>

                    </tr> 
                    <?php } ?>
            </tbody></table>
        <div class="BC_nd_2">
            <?php echo $paging; ?> 
        </div>
        <div class="Tma_8">
            <a href="<?php echo Url::createUrl("service/attachPaymentJarOption"); ?>" class="button_DNHT_1"> Gắn file khác </a>
        </div>
    </div>
    <!-- box footer -->
    <?php $this->widget("BoxFooter");?>
    <!-- end box footer -->
    </div>
